home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19990422-19990725
/
000266_news@columbia.edu _Mon Jul 12 16:20:29 1999.msg
< prev
next >
Wrap
Internet Message Format
|
1999-07-23
|
2KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id QAA09652
for <kermit.misc@watsun.cc.columbia.edu>; Mon, 12 Jul 1999 16:20:28 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id QAA01168
for kermit.misc@watsun.cc.columbia.edu; Mon, 12 Jul 1999 16:15:47 -0400 (EDT)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Subject: Re: Incrementing a value stored as a macro
Date: 12 Jul 1999 20:15:46 GMT
Organization: Columbia University
Message-ID: <7mdidi$14d$1@newsmaster.cc.columbia.edu>
To: kermit.misc@columbia.edu
In article <7md91i$p30$1@nnrp1.deja.com>,
quertyq@hotmail.com <quertyq@hotmail.com> wrote:
: Good Afternoon:
:
: I am using Kermit 95 Version 1.l.17.
:
: How can I have a value currently assigned as a macro, to be
: treated as an integer, and have it incremented?
:
If the macro is called "foo" and its value is numeric:
increment foo
: Let me explain ...
: I am using Figure 18-2 Mass mailing script as the example
: ( pg 412 in the 2nd edition C-Kermit manual ):
:
: def SPLIT {
: asg name \%1
: asg user \%2
: }
:
: My code snippet is as follows:
:
: define valu 7
: echo ** valu = \m(valu)
:
: increment \m(valu)
: echo ** valu = \m(valu)
:
: The result is:
: ** value = 7
: ** value = 7
:
Just put the macro name; don't enclose it in "\m()":
define valu 7
echo ** valu = \m(valu)
increment valu
echo ** valu = \m(valu)
This might seem confusing, but it makes sense. The \m() notation is
for use in unstructured environments. It tells Kermit to make a string
subsitution where it normally is expecting literal text. But in command
fields that accept only variable names, such as DEFINE, INCREMENT, etc,
you put the macro or variable name itself.
- Frank